'''
Created on 2009-11-15

@author: Administrator
'''
#!/usr/bin/env python
# -*- coding: latin-1 -*-
import logging
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__),"src"));
from google.appengine.ext import webapp
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler
from google.appengine.ext.webapp.util import run_wsgi_app
from page.mailblog import MailBlog
class MailHandler(InboundMailHandler):
    def receive(self, message):
        bodies = message.bodies(content_type='text/plain')
        allBodies = "";
        for body in bodies:
          allBodies = allBodies + "\n---------------------------\n" + body[1].decode()
        pass
    
application = webapp.WSGIApplication([
  MailBlog.mapping()
], debug=True)

def main():
  run_wsgi_app(application)
if __name__ == "__main__":
  main()